<!-- 所有提醒的dialog -->
<template>
	<view class="cu-modal {{modalName=='DialogModal1'?'show':''}}" v-show="showDialog">
	  <view class="cu-dialog">
	    <view class="cu-bar bg-white justify-end">
	      <view class="content">{{this.title}}</view>
	      <view class="action" bindtap="hideModal">
	        <text class="cuIcon-close text-red"></text>
	      </view>
	    </view>
	    <view class="padding-xl">
	      {{this.content}}
	    </view>
	    <view class="cu-bar bg-white justify-end">
	      <view class="action">
	        <button class="cu-btn line-green text-green" bindtap="hideModal" @click="this.showDialog=false">取消</button>
	        <button class="cu-btn bg-green margin-left" bindtap="hideModal" @click="this.showDialog=false">确定</button>
	      </view>
	    </view>
	  </view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				showDialog:false,
				title:'',
				content:''
			}
		},
		mounted() {
			uni.$on('showDialog',value=>{
				this.showDialog=ture
				this.title=value.title
				this.content=value.content
			})
		}
	}
</script>

<style>
</style>